//package xyz.xtt.exchange.service.impl;
//
//import org.springframework.stereotype.Service;
//
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//
//import lombok.extern.slf4j.Slf4j;
//import xyz.xtt.exchange.service.InterestService;
//
///**
// * @ClassName：InterestService
// * @Author: XGP
// * @Date: 2024/12/23/0023 15:53
// * @Desc:
// */
//
//@Slf4j
//@Service
//public class InterestServiceImpl extends ServiceImpl<TblAssetEntitlementMapper, TblAssetEntitlement> implements InterestService {
////	private static final String GENDER_PARAM = "gender";
////	@Autowired
////	TblAssetEntitlementMapper mapper;
////	@Autowired
////	private CacheManager cacheManager;
////	@Autowired
////	private ITblUserService userService;
////	@Autowired
////	private ITblCollectionService iTblCollectionService;
////	@Autowired
////	private NftService nftService;
////	@Autowired
////	private TblAssetTransactionService tblAssetTransactionService;
////	@Autowired
////	private ITblAssetService iTblAssetService;
////	@Autowired
////	private ITblAssetExtService iTblAssetExtService;
////	@Autowired
////	private ITblAssetStaticResourceService iTblAssetStaticResourceService;
////	@Autowired
////	private CheckLimitService checkLimitService;
////	@Autowired
////	private IAssetEntitlementService assetEntitlementService;
////	@Autowired
////	private IAssetAccountService assetAccountService;
////
////	@Autowired
////	private TblAssetEntitlementMapper assetEntitlementMapper;
////	@Autowired
////	private TblAssetEntitlementDeliverMapper assetEntitlementDeliverMapper;
////
////	@Autowired
////	private AssetClient assetClient;
////	@Autowired
////	private StringRedisTemplate stringRedisTemplate;
////	@Autowired
////	private IAssetAccountService iAssetAccountService;
////	@Autowired
////	private IAssetEntitlementDeliverService iAssetEntitlementDeliverService;
//
////	private TblCollection queryOrDefault(Long uid, Long cooperationId) {
////		// 默认风格直接new出来
////		if (Objects.equals(cooperationId, 0L)) {
////			return null;
////		}
////		TblCollection collection = cacheManager
////				.cacheObj(() -> iTblCollectionService.info(cooperationId, uid), ExchangeCache.TBL_COLLECTION, String.valueOf(uid), String
////						.valueOf(cooperationId));
////		if (Objects.isNull(collection)) {
////			throw new ChainException(ErrorMessage.USER_NOT_EXIST_COLLECTION);
////		}
////		return collection;
////	}
//
////	@Override
////	@Transactional(rollbackFor = Exception.class)
////	@Deprecated
////	public List<MintResponse> mintEntitlement(MintRequestV2Vo mintRequestVo) {
////		List<MintResponse> list = new ArrayList<>();
////		if (ReferProtocolEnum.ERC_1155.getDescription().equals(mintRequestVo.getTokenType())) {
////			MintResponse mint = mint(mintRequestVo);
////			list.add(mint);
////
////		}
////		if (ReferProtocolEnum.ERC_7211.getDescription().equals(mintRequestVo.getTokenType())) {
////			Integer count = mintRequestVo.getAmount();
////			mintRequestVo.setAmount(1);
////			for (int i = 0; i < count; i++) {
////				MintResponse mint = mint(mintRequestVo);
////				list.add(mint);
////			}
////		}
////		return list;
////	}
//
////	@Override
////	@Transactional(rollbackFor = Exception.class)
////	public ApiResult exchangeWork(ApiResult<Object> res, DeliverRequest deliverRequest, Integer gender) {
////		TblAssetEntitlement tblAssetEntitlement = assetEntitlementMapper.selectById(deliverRequest.getEntitlementId());
////		isNull(tblAssetEntitlement, ErrorMessage.ENTITLEMENT_NOT_EXIST);
////		String key = String.format("equity_exchange:%s:%s", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId());
////		String val = UUID.randomUUID().toString();
////		boolean lock = stringRedisTemplate.opsForValue().setIfAbsent(key, val, 1, TimeUnit.MINUTES);
////		if (lock) {
////			try {
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_02.equityNum() && gender == null) {
////					deliverRequest.setActivityType(ActivityTypeEnum.SUIT.name());
////				}
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_07.equityNum()) {
////					deliverRequest.setActivityType(ActivityTypeEnum.INSIGNE.name());
////				}
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_05.equityNum()) {
////					deliverRequest.setActivityType(ActivityTypeEnum.SUPER_GROUP.name());
////				}
////				// 判断是否该用户是否有这个权益
////				MPJLambdaWrapper<TblAssetAccount> relationQuery = JoinWrappers
////						.lambda(TblAssetAccount.class)
////						.select(TblAssetAccount::getAmount)
////						.eq(TblAssetAccount::getOwnerId, deliverRequest.getTargetUid())
////						.eq(TblAssetAccount::getAssetId, deliverRequest.getAssetId());
////				Long amount = relationQuery.one(Long.class);
////				isTrue(Objects.equals(0L, amount), ErrorMessage.EQUITY_EXCHANGE_USER_WRONG);
////				isTrue(tblAssetEntitlement.checkAmount(), ErrorMessage.EQUITYS_NUMBER_ZERO);
////				// 真实调用接口兑换权益
////				if (EquityTypeEnum.limitEquityTypes().contains(tblAssetEntitlement.getEquityType())) {
////					ApiResult<Boolean> deliver = assetClient.deliver(deliverRequest);
////					log.info("用户id: {} 的,权益id: {},兑换接口返回的结果信息为：{} ,", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId(), deliver.getMsg());
////					if (deliver.getData() != null && deliver.getData() == true) {
////						res.setCode(0);
////						res.setData("兑换成功！");
////						return res;
////					} else {
////						res.setCode(33);
////						res.setData(deliver.getMsg());
////						return res;
////					}
////				}
////				// 数字会员权益, 供应链开发能力--没有真实的兑换接口，暂时存储数据库
////				if (EquityTypeEnum.saveEquityTypes().contains(tblAssetEntitlement.getEquityType())) {
////					TblAssetEntitlementDeliver de = new TblAssetEntitlementDeliver();
////					de.setResult(1);
////					de.setAppUserId(deliverRequest.getTargetUid());
////					de.setAssetId(tblAssetEntitlement.getAssetId());
////					de.setEntitlementId(tblAssetEntitlement.getId());
////					de.setId(IdUtil.getSnowflakeNextId());
////					de.setCreateTime(System.currentTimeMillis());
////					assetEntitlementDeliverMapper.insert(de);
////					res.setCode(0);
////					res.setData("兑换成功！");
////					log.info("用户id:{}的, 权益id: {}成功兑换入库", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId());
////					return res;
////				}
////			} catch (Exception e) {
////				e.printStackTrace();
////				log.info("调用兑换接口异常，异常信息为: {}", e.getMessage());
////				res.setCode(ErrorMessage.EQUITY_EXCHANGE_INTERFACE.code());
////				res.setMsg(ErrorMessage.EQUITY_EXCHANGE_INTERFACE.message());
////				return res;
////			} finally {
////				if (val.equals(stringRedisTemplate.opsForValue().get(key))) {
////					stringRedisTemplate.delete(key);
////				}
////			}
////		}
////		throw new ChainException(ErrorMessage.EQUITY_EXCHANGE_FAILD);
////	}
////
////	@Transactional(rollbackFor = Exception.class)
////	public ApiResult exchangeWorkBak(ApiResult<Object> res, DeliverRequest deliverRequest, Integer gender) {
////		TblAssetEntitlement tblAssetEntitlement = assetEntitlementMapper.selectById(deliverRequest.getEntitlementId());
////		isNull(tblAssetEntitlement, ErrorMessage.ENTITLEMENT_NOT_EXIST);
////		String key = String.format("equity_exchange:%s:%s", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId());
////		String val = UUID.randomUUID().toString();
////		boolean lock = stringRedisTemplate.opsForValue().setIfAbsent(key, val, 1, TimeUnit.MINUTES);
////		if (lock) {
////			try {
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_02.equityNum() && gender == null) {
////					deliverRequest.setActivityType(ActivityTypeEnum.SUIT.name());
////				}
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_07.equityNum()) {
////					deliverRequest.setActivityType(ActivityTypeEnum.INSIGNE.name());
////				}
////				if (tblAssetEntitlement.getEquityType() == EquityTypeEnum.EQUITY_TYPE_05.equityNum()) {
////					deliverRequest.setActivityType(ActivityTypeEnum.SUPER_GROUP.name());
////				}
////				// 判断是否该用户是否有这个权益
////				MPJLambdaWrapper<TblAssetAccount> relationQuery = JoinWrappers
////						.lambda(TblAssetAccount.class)
////						.select(TblAssetAccount::getAmount)
////						.eq(TblAssetAccount::getOwnerId, deliverRequest.getTargetUid())
////						.eq(TblAssetAccount::getAssetId, deliverRequest.getAssetId());
////				Long amount = relationQuery.one(Long.class);
////				isTrue(Objects.equals(0L, amount), ErrorMessage.EQUITY_EXCHANGE_USER_WRONG);
////				isTrue(tblAssetEntitlement.checkAmount(), ErrorMessage.EQUITYS_NUMBER_ZERO);
////				// 真实调用接口兑换权益
////				if (EquityTypeEnum.limitEquityTypes().contains(tblAssetEntitlement.getEquityType())) {
////					ApiResult<Boolean> deliver = assetClient.deliver(deliverRequest);
////					log.info("用户id: {} 的,权益id: {},兑换接口返回的结果信息为：{} ,", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId(), deliver.getMsg());
////					if (deliver.getData() != null && deliver.getData() == true) {
////						res.setCode(0);
////						res.setData("兑换成功！");
////						return res;
////					} else {
////						res.setCode(33);
////						res.setData(deliver.getMsg());
////						return res;
////					}
////				}
////				// 数字会员权益, 供应链开发能力--没有真实的兑换接口，暂时存储数据库
////				if (EquityTypeEnum.saveEquityTypes().contains(tblAssetEntitlement.getEquityType())) {
////					TblAssetEntitlementDeliver de = new TblAssetEntitlementDeliver();
////					de.setResult(1);
////					de.setAppUserId(deliverRequest.getTargetUid());
////					de.setAssetId(tblAssetEntitlement.getAssetId());
////					de.setEntitlementId(tblAssetEntitlement.getId());
////					de.setId(IdUtil.getSnowflakeNextId());
////					de.setCreateTime(System.currentTimeMillis());
////					assetEntitlementDeliverMapper.insert(de);
////					res.setCode(0);
////					res.setData("兑换成功！");
////					log.info("用户id:{}的, 权益id: {}成功兑换入库", deliverRequest.getTargetUid(), deliverRequest.getEntitlementId());
////					return res;
////				}
////			} catch (Exception e) {
////				e.printStackTrace();
////				log.info("调用兑换接口异常，异常信息为: {}", e.getMessage());
////				res.setCode(ErrorMessage.EQUITY_EXCHANGE_INTERFACE.code());
////				res.setMsg(ErrorMessage.EQUITY_EXCHANGE_INTERFACE.message());
////				return res;
////			} finally {
////				if (val.equals(stringRedisTemplate.opsForValue().get(key))) {
////					stringRedisTemplate.delete(key);
////				}
////			}
////		}
////		throw new ChainException(ErrorMessage.EQUITY_EXCHANGE_FAILD);
////	}
//
////	@Override
////	public Boolean exchangeWorkEx(Long uid, Long id, Integer gender, Long assetId) {
////		TblUser userInfo = this.userService.infoWithUserId(uid);
////		isNull(userInfo, ErrorMessage.USER_NOT_EXIST);
////		TblAssetEntitlement tblAssetEntitlement = assetEntitlementMapper.selectById(id);
////		isNull(tblAssetEntitlement, ErrorMessage.ENTITLEMENT_NOT_EXIST);
////		isFalse(tblAssetEntitlement.checkTime(), ErrorMessage.INVALID_TIME_RANGE);
////		isTrue(tblAssetEntitlement.checkAmount(), ErrorMessage.EQUITYS_NUMBER_ZERO);
////		boolean checkDeliverSucc = iAssetEntitlementDeliverService.checkDeliverSucc(id, uid);
////		isTrue(checkDeliverSucc, ErrorMessage.ENTITLEMENT_ALREADY_REDEEMED, () -> log.info("uid:{},entitlementId:{}", uid, id));
////		String key = String.format("equity_exchange:%s:%s", uid, id);
////		String val = UUID.randomUUID().toString();
////		boolean lock = stringRedisTemplate.opsForValue().setIfAbsent(key, val, 1, TimeUnit.MINUTES);
////		if (lock) {
////			try {
////				BigDecimal amount = iAssetAccountService.amount(uid, assetId);
////				isTrue(BigDecimal.ZERO.compareTo(amount) == 0, ErrorMessage.EQUITY_EXCHANGE_USER_WRONG);
////				EquityTypeEnum requestType = EquityTypeEnum.requestType(tblAssetEntitlement.getEquityType());
////				isNull(requestType, ErrorMessage.ENTITLEMENT_NOT_EXIST, () -> log.info("convert requestType is null {}", tblAssetEntitlement.getEquityType()));
////				DeliverRequest request = DeliverRequest
////						.builder()
////						.assetId(assetId)
////						.activityType(requestType.thirdType())
////						.targetUid(uid)
////						.entitlementId(id)
////						.build();
////				if (requestType.checkThirdRequest()) {
////					buildSuitGender(request, gender, userInfo);
////					log.info("user uid:{}, request param: {}", userInfo.getAppUserId(), JSONUtil.toJsonStr(request));
////					ApiResult<Boolean> deliver = assetClient.deliver(request);
////					log.info("userId:{},entitlementid:{},assetClient response:{}", uid, id, JSONUtil.toJsonStr(deliver));
////					return Optional.ofNullable(deliver).map(ApiResult::getData).orElse(Boolean.FALSE);
////				} else {
////					return saveLocalDeliver(uid, id, assetId);
////				}
////			} catch (Exception e) {
////				log.info("调用兑换接口异常，异常信息为: {}", e.getMessage(), e);
////			} finally {
////				if (val.equals(stringRedisTemplate.opsForValue().get(key))) {
////					stringRedisTemplate.delete(key);
////				}
////			}
////		}
////		return Boolean.FALSE;
////	}
////
////	private Boolean saveLocalDeliver(Long uid, Long entitlementId, Long assetId) {
////		TblAssetEntitlementDeliver de = new TblAssetEntitlementDeliver();
////		de.setResult(DeliverResult.SUCC.code());
////		de.setAppUserId(uid);
////		de.setAssetId(assetId);
////		de.setEntitlementId(entitlementId);
////		de.setId(IdUtil.getSnowflakeNextId());
////		de.setCreateTime(System.currentTimeMillis());
////		return assetEntitlementDeliverMapper.insert(de) == 1;
////	}
//
////	private static void buildSuitGender(DeliverRequest request, Integer gender, TblUser userInfo) {
////		if (Objects.equals(request.getActivityType(), EquityTypeEnum.EQUITY_TYPE_02.thirdType())) {
////			// 如果性别是男或v 在传递性别参数
////			if (Objects.nonNull(gender) && (gender == 1 || gender == 2)) {
////				// 用户的性别是不是有效，无效时才使用用户传递的参数
////				boolean check = userInfo.checkGender();
////				log.info("user uid:{},gender:{},check:{}", userInfo.getAppUserId(), userInfo.getGender(), check);
////				// 用户没有设置性别时，才使用用户传递的参数
////				if (check) {
////					request.setActivityType(ActivityTypeEnum.SUIT_GENDER.name());
////					request.setExternParm(JSONUtil.toJsonStr(Map.of(GENDER_PARAM, gender)));
////				}
////			}
////		}
////	}
//
////	@Deprecated
////	public MintResponse mint(MintRequestV2Vo mintRequestVo) {
////		String uid = mintRequestVo.getUid();
////		AssetTypeEnum assetType = AssetTypeEnum.queryConvert(mintRequestVo.getType());
////		TblUser appUserInfo = cacheManager.cacheObj(() -> userService.findByAppUserId(uid), ExchangeCache.TBL_USER, mintRequestVo.getUid());
////		// 前置校验
////		nftService.mintBeforeCheck(appUserInfo, assetType, mintRequestVo.getDisplayUri(), mintRequestVo.checkText());
////		long assetId = IdUtil.getSnowflakeNextId();
////		TblAsset asset = mintRequestVo.buildGroundAsset(uid, assetId, assetId, assetType);
////
////		TblAssetExt assetExt = mintRequestVo.buildGroundAssetExt(assetId, asset.getId(), "4");
////
////		TblAssetStaticResource staticResource = mintRequestVo.buildStaticResource(assetId, FileTypeEnum.IMG);
////		List<TblAssetEntitlement> tblAssetEntitlements = mintRequestVo.buildEntitlementList(assetId);
////
////		TblAssetAccount assetAccount = mintRequestVo.buildAssetAccount(assetId, appUserInfo.getAppUserId());
////
////		// 增加交易记录
////		TblAssetTransaction buildTransaction = tblAssetTransactionService
////				.buildTransaction(asset, uid, DealStateEnum.PAID, OrderTypeEnum.ENTITLEMENT_MINT, SellPatternEnum.MINT, BigDecimal.ONE);
////
////		MetaDataParams buildMetaData = buildMetaData(asset, assetType, mintRequestVo, appUserInfo);
////		String metaData = JSONUtil.toJsonStr(buildMetaData);
////		asset.setMetaData(metaData);
////		assetExt.setMetadata(metaData);
////		boolean saveAssetResult = this.iTblAssetService.save(asset);
////		boolean saveAssetExtResult = this.iTblAssetExtService.save(assetExt);
////		boolean saveAssetStaticResult = this.iTblAssetStaticResourceService.save(staticResource);
////		boolean saveTransaction = this.tblAssetTransactionService.save(buildTransaction);
////		boolean saveEntitlement = true;
////		if (tblAssetEntitlements != null && !tblAssetEntitlements.isEmpty()) {
////			saveEntitlement = this.assetEntitlementService.saveBatch(tblAssetEntitlements);
////		}
////
////		boolean saveAssetAccount = this.assetAccountService.save(assetAccount);
////		if (saveAssetResult && saveAssetExtResult && saveAssetStaticResult && saveTransaction && saveEntitlement && saveAssetAccount) {
////			// 成功次数+1
////			checkLimitService.plusDayValue(uid, CheckLimitTypeEnum.MINT, DimensionalTypeEnum.SUCC);
////		}
////		return MintResponse.builder().goodsId(asset.getGoodsId()).assetId(assetId).build();
////	}
//
////	private MetaDataParams buildMetaData(TblAsset asset, AssetTypeEnum assetType, MintRequestV2Vo mintRequestVo, TblUser appUserInfo) {
////		MetaDataParams params = new MetaDataParams();
////		params.setDescription(asset.getDescription());
////		params.setImage(mintRequestVo.getDisplayUri());
////		params.setName(asset.getAssetName());
////		List<MetaDataAttribute> attributes = Lists.newArrayList();
////		attributes.add(new MetaDataAttribute("类型", assetType.desc()));
////		attributes.add(new MetaDataAttribute("创作者", appUserInfo.getNickname()));
////		attributes.add(new MetaDataAttribute("创作时间", String.valueOf(asset.getCreateDatetime())));
////		attributes.add(new MetaDataAttribute("权益", mintRequestVo.getTblEntitlement()));
////		params.setAttributes(attributes);
////		return params;
////	}
//
////	@Override
////	public NftInterestDetailsVo getNftDetails(String goodsId, String uid) {
////		Long uidL = Long.parseLong(uid);
////		AssetBaseInfo assetBaseInfo = iTblAssetService.baseInfo(goodsId);
////		if (null == assetBaseInfo) {
////			return null;
////		}
////		// 组合数据
////		Long assetId = assetBaseInfo.getAsset().getId();
////		NftInterestDetailsVo build = NftInterestDetailsVo.build(assetBaseInfo);
////
////		// 查询权益信息
////		List<TblAssetEntitlement> assetEntitlement = getAssetEntitlement(assetId);
////		List<InterestVo> interestVo = DozerUtil.transforList(assetEntitlement, InterestVo.class);
////
////		// 查询我是否拥有资产
////		TblAssetAccount account = new LambdaQueryChainWrapper<>(tblAssetAccountMapper)
////				.eq(TblAssetAccount::getAssetId, assetId)
////				.eq(TblAssetAccount::getOwnerId, uidL)
////				.gt(TblAssetAccount::getAmount, 0)
////				.one();
////		// 存在资产
////		if (Objects.nonNull(account)) {
////			build.setOwnerId(uid);
////			buildDeliverResult(interestVo, assetId, uidL);
////			// 可以加群
////			build.setIsAddGroup(true);
////			// 可以赠送
////			if (Objects.equals(OwnerTypeEnum.USER.code(), assetBaseInfo.getAsset().getOwnerType())
////					&& Objects.equals(assetBaseInfo.getAssetExt().getUpChain(), UpChainEnum.YES.code())) {
////				build.setIsGiveAway(true);
////			}
////		}
////		build.setInterestVoList(interestVo);
////		// 处理用户名称 头像
////		Long sellUid = Longs.tryParse(build.getAuthorId());
////		Long buyUid = Longs.tryParse(build.getOwnerId());
////		Set<Long> uids = Sets.newHashSet(sellUid, buyUid, uidL);
////		Map<Long, TblUser> userMap = queryUsers(uids);
////		build.setBuyerNickname(getUserField(userMap, buyUid, TblUser::getNickname));
////		build.setBuyerAvatar(getUserField(userMap, buyUid, TblUser::getAvatarUri));
////		build.setSellerNickname(getUserField(userMap, sellUid, TblUser::getNickname));
////		build.setSellerAvatar(getUserField(userMap, sellUid, TblUser::getAvatarUri));
////		build.setIssuer(getUserField(userMap, sellUid, TblUser::getNickname));
////		build.setFoundryMan(getUserField(userMap, sellUid, TblUser::getNickname));
////		build.setIssuerPlatform(getUserField(userMap, sellUid, TblUser::getNickname));
////		TblUser tblUser = userMap.get(uidL);
////		build.setActiveParam(tblUser.getGender().toString());
////
////		// 查询交易
////		TblAssetTransaction notPaiedTransaction = tblAssetTransactionService.queryNotPaiedPersonalMintUpChaninOrder(assetId, uid);
////		if (Objects.nonNull(notPaiedTransaction)) {
////			build.setUpChainPaying(true);
////		}
////
////		// @TODO 处理群ID
////		if (Objects.nonNull(build.getIsAddGroup()) && build.getIsAddGroup()) {
////			build.setImGroupId(iAssetGroupService.getImGroupId(assetBaseInfo.getAsset().getId()));
////		}
////		// 查询是否有群ID
////
////		// 1155资产设置剩余数量
////		if (Objects.equals(assetBaseInfo.getAssetExt().getReferProtocol(), ReferProtocolEnum.ERC_1155.getDescription())) {
////			if (!Objects.equals(uidL, Long.valueOf(assetBaseInfo.getAsset().getAuthorId()))) {
////				account = new LambdaQueryChainWrapper<>(tblAssetAccountMapper)
////						.eq(TblAssetAccount::getAssetId, assetId)
////						.eq(TblAssetAccount::getOwnerId, Long.valueOf(assetBaseInfo.getAsset().getAuthorId()))
////						.one();
////			}
////			build.setGoodsRemain(account != null ? account.getAmount().intValue() : 0);
////		} else {
////			build.setGoodsRemain(0);
////		}
////		build.setCurrentDataTime(System.currentTimeMillis());
////		build.setPublicityPeriod(assetBaseInfo.getAssetExt().checkPublicityPeriodEnd());
////		build.setCurrAvatar(getUserField(userMap, uidL, TblUser::getAvatarUri));
////		if (canShelf) {
////			// 判断上架状态 uid==authorId&&uid==ownerId&&sellPattern==0&&bizType==NFT&&Balance g 0
////			if (Objects.equals(uidL, Long.valueOf(assetBaseInfo.getAsset().getAuthorId()))
////					&& Objects.equals(uidL, Long.valueOf(assetBaseInfo.getAsset().getOwnerId()))
////					&& Objects.equals(assetBaseInfo.getAsset().getSellPattern(), SellPatternEnum.NORMAL.code())
////					&& BizTypeEnum.NFT.dbType().equalsIgnoreCase(assetBaseInfo.getAsset().getBizType()) && Objects.nonNull(account)) {
////				build.setChainOver5Days(true);
////			}
////
////			// 重铸类型需要多判断5天的条件 铸造权超过5天
////			if (assetBaseInfo.getAsset().getSecondType().equals(SecondEnum.MINT_POWER.getCode()) && DateUtil
////					.between(new Date(assetBaseInfo.getAsset().getCreateDatetime()), new Date(
////							System.currentTimeMillis()), DateUnit.MINUTE) < secondTypeShelfTimeMinutes) {
////				build.setChainOver5Days(false);
////			}
////		}
////		// 查询卡列表 todo物流信息
////		queryCardList(assetBaseInfo, uidL, build);
////		// 查询最大购买价格
////		Long oldGoodsId = assetBaseInfo.getAsset().getParentId();
////		BigDecimal bigDecimal = tblAssetTransactionService.buyMaxPriceWithHistory(uid, oldGoodsId);
////		build.setMaxPrice(bigDecimal.toString());
////		build.setMaxPriceNERemintType(maxPriceNERemintType.divide(new BigDecimal(assetBaseInfo.getAsset().getAmount()), 2, RoundingMode.DOWN).toString());
////		// 查询是否认证 把认证时间返回
////		build.setAuthorAuthDate(queryAuthDate(assetBaseInfo.getAsset().getAuthorId()));
////		return build;
////	}
//
////	private Long queryAuthDate(String authorId) {
////		UserVo userInfo = userService.getUserInfo(authorId);
////		if (Objects.nonNull(userInfo)) {
////			return userInfo.getAuthBefore();
////		}
////		return 0L;
////	}
//
////	private void queryCardList(AssetBaseInfo assetBaseInfo, Long uidL, NftInterestDetailsVo build) {
////		// 获取用户卡片信息
////		List<TblAssetCardDto> cardList = getUserCardList(assetBaseInfo, uidL);
////		if (cardList.isEmpty()) {
////			build.setCardList(Collections.emptyList());
////			return;
////		}
////
////		// 过滤出需要补充物流信息的卡片 ID 列表
////		List<Long> idList = filterCardIdsForLogistics(cardList);
////		if (idList.isEmpty()) {
////			build.setCardList(cardList);
////			return;
////		}
////
////		// 获取物流订单信息
////		Map<String, BusinessOrderDto> orderMap = getLogisticsOrderMap(uidL, idList);
////		if (orderMap.isEmpty()) {
////			build.setCardList(cardList);
////			return;
////		}
////
////		// 补充物流信息到卡片列表
////		supplementLogisticsInfo(cardList, orderMap);
////		build.setCardList(cardList);
////	}
//}
